﻿<UserControl x:Class="GlobalizationTools.ViewModel.MultiResourceViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ui="clr-namespace:GlobalizationTools.UI"
             Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
             Padding="4">
    <Border BorderThickness="0.5"
            BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <ToolBarPanel Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
                <ToolBar Name="mainToolBar">
                    <ComboBox Name="SelectedType"
                        Padding="4,1,4,1"
                              IsEditable="False"
                              SelectedIndex="{Binding CurrentTypeIndex}"
                              SelectionChanged="SelectedType_SelectionChanged">
                        <ComboBoxItem>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16"
                                       Height="16"
                                       Margin="0,0,3,0"
                                       Source="Images\String.png" />
                                <TextBlock Text="{LocText GlobalizationTools:LocalizationResource:Strings}" />
                            </StackPanel>
                        </ComboBoxItem>
                        <ComboBoxItem>
                                <StackPanel Orientation="Horizontal">
                                <Image Width="16"
                                       Height="16"
                                       Margin="0,0,3,0"
                                       Source="Images\Images.png" />
                                <TextBlock Text="{LocText GlobalizationTools:LocalizationResource:Images}" />
                            </StackPanel>
                        </ComboBoxItem>
                        <ComboBoxItem>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16"
                                       Height="16"
                                       Margin="0,0,3,0"
                                       Source="Images\Icons.png" />
                                <TextBlock Text="{LocText GlobalizationTools:LocalizationResource:Icons}" />
                            </StackPanel>
                        </ComboBoxItem>
                        <ComboBoxItem>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16"
                                       Height="16"
                                       Margin="0,0,3,0"
                                       Source="Images\Audio.png" />
                                <TextBlock Text="{LocText GlobalizationTools:LocalizationResource:Audio}" />
                            </StackPanel>
                        </ComboBoxItem>
                        <ComboBoxItem>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16"
                                       Height="16"
                                       Margin="0,0,3,0"
                                       Source="Images\Files.png" />
                                <TextBlock Text="{LocText GlobalizationTools:LocalizationResource:Files}" />
                            </StackPanel>
                        </ComboBoxItem>
                        <ComboBoxItem>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16"
                                       Height="16"
                                       Margin="0,0,3,0"
                                       Source="Images\Other.png" />
                                <TextBlock Text="{LocText GlobalizationTools:LocalizationResource:Other}" />
                            </StackPanel>
                        </ComboBoxItem>
                    </ComboBox>
                </ToolBar>
            </ToolBarPanel>
            <ui:DataGridView x:Name="grid"
                              Grid.Row="1"
                              ItemsSource="{Binding List}"
                              AutoGenerateColumns="False"
                              CanUserAddRows="True"
                              CanUserDeleteRows="True"
                              InitializingNewItem="grid_InitializingNewItem"
                              CanUserReorderColumns="True"
                              CanUserResizeColumns="True"
                              CanUserResizeRows="True"
                              CanUserSortColumns="True"
                              Margin="8"
                              BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"
                              BorderThickness="2"
                              RowHeaderWidth="20"
                              VerticalContentAlignment="Center"
                              AlternationCount="2"
                              AlternatingRowBackground="#FFF0F0F0"
                              GridLinesVisibility="Vertical"
                              ColumnsContext="{Binding Columns}">
                <ui:DataGridView.Columns>
                    <DataGridTextColumn Header="{LocText GlobalizationTools:LocalizationResource:Name}"
                                                Binding="{Binding Name}" />
                </ui:DataGridView.Columns>
            </ui:DataGridView>
        </Grid>
    </Border>
</UserControl>
